Skip to content

perf: find TokenTable index once#425

Merged
dkharms merged 2 commits into
mainfrom
0-token-table-scan
May 18, 2026
Merged

perf: find TokenTable index once#425
dkharms merged 2 commits into
mainfrom
0-token-table-scan

Conversation

@dkharms
Copy link
Copy Markdown
Member

@dkharms dkharms commented May 14, 2026

Description

TableLoader.Load previously re-scanned all token blocks on every call to find the start of the token table. This commit extracts that scan into advanceToTable, guarded by a sync.Once, so the linear scan over token blocks happens at most once per TableLoader instance.


  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

If you have used LLM/AI assistance please provide model name and full prompt:

Model: {{model-name}}
Prompt: {{prompt}}

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 14, 2026

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.64%. Comparing base (e0cf437) to head (f162f85).

Files with missing lines Patch % Lines
frac/sealed/token/table_loader.go 76.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #425      +/-   ##
==========================================
- Coverage   70.65%   70.64%   -0.02%     
==========================================
  Files         219      219              
  Lines       16967    16970       +3     
==========================================
  Hits        11988    11988              
- Misses       4084     4086       +2     
- Partials      895      896       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkharms dkharms added the performance Features or improvements that positively affect seq-db performance label May 14, 2026
@eguguchkin eguguchkin added this to the v0.71.0 milestone May 18, 2026
@eguguchkin eguguchkin requested review from cheb0, eguguchkin and forshev and removed request for eguguchkin May 18, 2026 10:15
Comment thread frac/sealed/token/table_loader.go
@dkharms dkharms force-pushed the 0-token-table-scan branch from e27177b to f162f85 Compare May 18, 2026 13:19
@dkharms dkharms merged commit 03b2cad into main May 18, 2026
8 checks passed
@dkharms dkharms deleted the 0-token-table-scan branch May 18, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Features or improvements that positively affect seq-db performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants